#ifndef VIEW_BASE_H
#define VIEW_BASE_H

#include <QDialog>

#include "request_handler_base.h"

class ViewBase : public QDialog
{
    Q_OBJECT
  public:
    explicit ViewBase(QWidget *parent = 0);
    virtual ~ViewBase();

    inline void SetRequestHandler(RequestHandler *handler) {
      handler_ = handler;
    }

    virtual void IssueRequest() = 0;

    void Show();
  protected:
    virtual int parse_result(QDomElement &) { return 0; }
  signals:

  public slots:

  protected:
    RequestHandler *handler_;
};

#endif // VIEW_BASE_H
